package com.lizhi.yun.base;

import com.lizhi.yun.db.pojo.MenuLevelPOJO;
import com.lizhi.yun.db.pojo.UppMenuPOJO;
import com.lizhi.utils.tools.BeanCopyUtil;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


public abstract class UppSysUtil {

	public static Map<String, UppMenuPOJO> getMenuMap(List<UppMenuPOJO> menus) {
		Map<String, UppMenuPOJO> map = new HashMap<>();
		for (UppMenuPOJO m : menus) {
			map.put(m.getMenuId(), m);
		}
		return map;
	}

	public static MenuLevelPOJO getMenuLevelVO(UppMenuPOJO menuDO) {
		MenuLevelPOJO vo = new MenuLevelPOJO();
		BeanCopyUtil.copy(menuDO, vo);
		return vo;
	}

}
